[mirrors]
http://ftp.gnome.org/pub/gnome/sources/glib/2.48/glib-2.48.1.tar.xz

[vars]
filesize=7441032
sha512=5bbea7d07ba6d75c35c6be8f1ebc685aa2549bd20030741b2d6e2c30e9b2d476c2afa50a974bbdad98c305666c8b04357b51619c97fe50d3e9965700088aad9b

[deps]
musl
libffi
gettext
zlib
libiconv
libelf
pcre

[deps.host]
perl
pkgconf

[build]
#20160511: chasing why cup-filters wouldn't compile, 'gdbus-codegen.py' missing from glib. 
# glib-no_python.patch is the cause, take it out. I also found it breaks build of glib if dbus is installed.
for p in glib-gtimer-varargs ; do
	echo $p
	patch -p1 < "$K"/$p.patch
done

this_dir="$PWD"
[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine) --with-sysroot=$butch_root_dir"

CFLAGS="-D_GNU_SOURCE -D_BSD_SOURCE -Dloff_t=off_t $optcflags" \
LDFLAGS="$optldflags" ./configure -C $xconfflags \
  --prefix="$butch_prefix" --disable-modular-tests --disable-selinux --disable-fam \
  --disable-silent-rules glib_cv_stack_grows=no glib_cv_uscore=no \
  ac_cv_func_posix_getpwuid_r=yes ac_cv_func_posix_getgrgid_r=yes \
  --with-libiconv=gnu --with-pcre=system --enable-libelf \
  --enable-debug=no --disable-installed-tests --disable-always-build-tests \
  --disable-static --disable-selinux

echo '#include <string.h>' >> config.h

# skip over bogus "missing" checks that only waste time or cause build errors
echo true > missing

make V=1 -j$MAKE_THREADS DESTDIR="$butch_install_dir" \
  LDFLAGS="-Wl,-rpath-link=$this_dir/gthread/.libs/ -Wl,-rpath-link=$this_dir/gmodule/.libs/" \


make DESTDIR="$butch_install_dir" install

